import 'package:flutter/services.dart';
import 'package:flutter_module/map/models/ni_location_model.dart';
import 'package:flutter_module/system/library_map.dart';

class NILocationDispatcher {
  /// 动态更新我的位置数据
  ///
  /// location	定位数据
  Future<bool?> updateLocationData(
      MethodChannel _mapChannel, NILocation location,
      {bool tracking = true}) async {
    return await _mapChannel.invokeMethod(
            NILocationMethodId.kMapUpdateLocationDataMethod,
            {"location": location.toMap(), "tracking": tracking} as dynamic)
        as bool?;
  }
}
